﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using NJT.授权;

namespace FM
{
    public class 授权
    {

        public const string 管理公钥 =
           "<RSAKeyValue><Modulus>qwRdHqOsEuAPp74ZFbIrNE+1QV4WZ5n8EJNdcvyngDqr0EcmaLbCJ6bYw3GYoDtsBAuLJhNsDoOL49LKGz9IXmnFzNN7hgWHbVDTbA94QkYy9Q3AB6H04BUpFsEzXS0xDsRWlU8xYS52dfAQvjqmpagcpSa+Cvzb7Ws7xMbSUoU=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>";

        public const string 录播公钥 =
            "<RSAKeyValue><Modulus>wpiVkYMs+H/1nDtThwDlZKIiMPCguff6nTNjAMzfdbnsDuG+cn6CMBXtWxPT8O5hqKXvNVznocFDrmhAgq3kRiWeRVkeIZ2KimTtdymiM8gYaZAtUR0i0p0g818dUHKv9Latm6EJTS7T7Eky9VckKjcVJKodvio4hCpHpzgEfg8=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>";

        public const string 直播公钥 =
            "<RSAKeyValue><Modulus>whsTMBkv83JbXB2yWiGSO/L1Uff5trD68svTws7Ks/ECbgJsF30oRiqBggv+g+t2DMFTQP2Qt7dJzzPdUpQnscFa5znrIynlXHFPKZElEPBI1bTyvy3NC0dSbcE4QYTwzMZznK5i4zT6nlsRBDlhCKCoX/U2rtyPCg+c+DGjneE=</Modulus><Exponent>AQAB</Exponent></RSAKeyValue>";

        public const string GpkH = "7D04E818E265B9C5C845A49C86F9FB1E";
        public const string LpkH = "64201A67ADA78664C1C13113EF7FF4D2";
        public const string ZpkH = "35C078721CF6955229CAF413019E3F9E";
        public static DateTime MinDate = DateTime.MinValue.AddYears(2009);


        public static bool 管理验证(string 机器码, string 注册码)
        {
            return 注册.验证授权码_混合(管理公钥, 机器码, 注册码);
        }

        public static bool 录播验证(string 机器码, string 注册码)
        {
            return 注册.验证授权码_混合(录播公钥, 机器码, 注册码);
        }

        public static bool 直播验证(string 机器码, string 注册码)
        {
            return 注册.验证授权码_混合(直播公钥, 机器码, 注册码);
        }

        public static string 特征码()
        {
            return 硬件信息.特征码组合();
        }
    }

  
}
